#import <UIKit/UIKit.h>
#ifndef AppConstant_h
#define BASEURL @"http://119.23.29.41:8281/remotesurvey/api/"

//注意：请直接获取系统的tabbar高度，若没有用系统tabbar，建议判断屏幕高度；之前判断状态栏高度的方法不妥，如果正在通话状态栏会变高，导致判断异常，下面只是一个例子，请勿直接使用！
#define IS_IPHONEX (([[UIScreen mainScreen] bounds].size.height-812)?NO:YES)
#define isFirstKey @"first"
#define SCREEN_HEIGHT (IS_IPHONEX ? ([[UIScreen mainScreen] bounds].size.height-34):([[UIScreen mainScreen] bounds].size.height))
#define NAVI_HEIGHT (IS_IPHONEX ? 44.0f : 20.0f)
#define UserDefaults [NSUserDefaults standardUserDefaults]
/** 屏幕 */
#define KEY_WINDOW [[[UIApplication sharedApplication] delegate] window]
#define SCREEN_WIDTH [[UIScreen mainScreen] bounds].size.width
// 以iPhone 6为标准尺寸计算比例
#define SCREEN_RU(pt)  ((pt) * (SCREEN_WIDTH / 375.0))
/** 导航栏高度 */
static const CGFloat NAVIGATIONBAR_HEIGHT = 44.0f;
/** 状态栏高度 */
#define STATUS_HEIGHT [[UIApplication sharedApplication] statusBarFrame].size.height
//static const CGFloat STATUS_HEIGHT = 20.0f;
/** 状态导航栏高度 */
#define NAVSTATUS_HEIGHT [UINavigationController new].navigationBar.frame.size.height + STATUS_HEIGHT
//static const CGFloat NAVSTATUS_HEIGHT = 64.0f;
/** ToolBar高度 */
//static const CGFloat TOOLBAR_HEIGHT = 44.0f;
///** Menu高度 */
//#define kMenuHeight SCREEN_RU(44)
//#define kNewMenuHeight SCREEN_RU(40)
//
///** 锁定时间 */
//static const CGFloat kLockTime = 300.0f;
///** 轮播图时间 */
//static const CGFloat kCycleTime = 6.0f;
///** 公告时间 */
//static const CGFloat kNoticeTime = 4.0f;
///** 延长启动动画时间 */
//static const NSInteger kDeferLaunchTime = 2.0f;
///** 限制上传图片数量 */
//static const NSInteger kMaxUploadImagesCount = 20;
//
///** 颜色 */
#define UIColorFromRGBString(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
////#define UIColorFromRGBA(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
//#define UIColorFromRGB(r,g,b) UIColorFromRGBA(r,g,b,1.0)
//#define UIColorFromD(d) UIColorFromRGB(d,d,d)
///** 导航栏颜色 */
//#define kNavColor UIColorFromRGBString(0x2CA9FF)
///** 主题颜色 */
//#define THEME_COLOR UIColorFromRGB(56.0, 173.0, 255.0)
///** 通用背景颜色 */
//#define BACKGROUND_COLOR UIColorFromRGBString(0xF2F5F9)
///** 通用线颜色 */
//#define LINE_COLOR UIColorFromRGBString(0xeaeff3)
///** 通用文本颜色353638 */
//#define DEFAULT333_COLOR UIColorFromRGBString(0x353638)
///** 通用文本颜色353638 */
//#define DEFAULT_353638_COLOR UIColorFromRGBString(0x353638)
///** 通用文本颜色A2A9B0 */
//#define DEFAULT_A2A9B0_COLOR UIColorFromRGBString(0xA2A9B0)
///** 通用文本颜色656B6F */
//#define DEFAULT_656B6F_COLOR UIColorFromRGBString(0x656B6F)
///** 通用文本颜色666 */
//#define DEFAULT666_COLOR UIColorFromRGBString(0x666666)
///** 通用文本颜色999 */
//#define DEFAULT999_COLOR UIColorFromRGBString(0x999999)
///** 边框颜色 */
//#define BORDER_COLOR UIColorFromRGBString(0xc7d0d7)
///** 白色 */
//#define WHITE_COLOR [UIColor whiteColor]
///** PLACEHOLDER_COLOR */
//#define PLACEHOLDER_COLOR UIColorFromRGBString(0xc7d0d7)
///** 个车颜色 */
//#define gecheColor UIColorFromRGBString(0x756fee)
///** 团车颜色 */
//#define tuancheColor UIColorFromRGBString(0xff4d4d)
///** 个意颜色 */
//#define geyiColor UIColorFromRGBString(0x56cdac)
///** 团意颜色 */
//#define tuanyiColor UIColorFromRGBString(0xa9d132)
///** 个财颜色 */
//#define gecaiColor UIColorFromRGBString(0x329aff)
///** 团财颜色 */
//#define tuancaiColor UIColorFromRGBString(0xf2a33d)
//
///** UUID */
////#define UUID [[[UIDevice currentDevice] identifierForVendor] UUIDString]
//
//
///** 常用代码 */
///** 弱引用 */
//#define WeakSelf(weakSelf) __weak __typeof(&*self)weakSelf = self;
///** 单例声明 */
//#define SINGLETON() + (instancetype)sharedInstance;
///** 单例 */
//#define Implement_SINGLETON(_class_name) \
//+ (instancetype)sharedInstance \
//{ \
//static _class_name * aInstance = nil; \
//static dispatch_once_t onceToken; \
//dispatch_once(&onceToken, ^{ aInstance = [[_class_name alloc] init]; }); \
//return aInstance; \
//}
//
///** NSLog */
//#ifdef DEBUG
//#define NSLog(FORMAT, ...) NSLog((@"%s [Line %d] " FORMAT), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
//#else
//#define NSLog(FORMAT, ...) nil
//#endif
//
///// 适配iPhone X + iOS 11
//#define PAAdjustsScrollViewInsets_Never(__scrollView)\
//do {\
//_Pragma("clang diagnostic push")\
//_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"")\
//if ([__scrollView respondsToSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:")]) {\
//NSMethodSignature *signature = [UIScrollView instanceMethodSignatureForSelector:@selector(setContentInsetAdjustmentBehavior:)];\
//NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\
//NSInteger argument = 2;\
//invocation.target = __scrollView;\
//invocation.selector = @selector(setContentInsetAdjustmentBehavior:);\
//[invocation setArgument:&argument atIndex:2];\
//[invocation retainArguments];\
//[invocation invoke];\
//}\
//_Pragma("clang diagnostic pop")\
//} while (0)
///// 判断设备是否iPhone X
//#define IS_IPHONE_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
//
///** Alert */
//#define Alert(MESSAGE) [[[UIAlertView alloc] initWithTitle:@"温馨提示" message:MESSAGE delegate:nil cancelButtonTitle:@"确认" otherButtonTitles:nil] show]
//
///** AlertTip */
//#define AlertTip(MESSAGE, ...) [[[MMAlertView alloc] initWithTitle:@"温馨提示" detail:MESSAGE items:@[MMItemMake(@"确定", MMItemTypeHighlight, nil)]] show];
//
///** 判断iOS版本 */
//#define iOS(v) ([UIDevice currentDevice].systemVersion.doubleValue >= (v))

#endif
